<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app" style="margin: 100px;">
        <parent></parent>
    </div>
    <template id="par">
    <div>
        <h1>{{parentMsg}}:{{message}}</h1>
        <childl @change="getVal"></childl>
    </div>
</template>
    <template id="c1">
    <div>
        <button @click="fn">点击传值组件</button>
        <p>准备专递的数据：{{cMsg1}}</p>
    </div>
</template>
</body>
<script>
    var vm = new Vue({
        el: "#app",
        data: {

        },
        components: {
            "parent": {
                template: "#par",
                data() {
                    return {
                        parentMsg: "父组件接收信息"，
                        message: ""
                    }
                }
            }






        }
    })
</script>

</html>